from ronglian_sms_sdk import SmsSDK
import json


def sendMsg(mobile,code):
    # return True
    accId="8aaf070883c5db6a018407b477e30a77"
    accToken="8cbc9d336319429c877279c0c29b3912"
    appId="8aaf070883c5db6a018407b478d30a7e"
    sdk = SmsSDK(accId,accToken,appId)
    tid = '1'
    datas = (code,'5')
    resp = sdk.sendMessage(tid,mobile,datas)
    mes = json.loads(resp)
    if mes['statusCode'] == '000000':
        return True
    return False
